package com.kfm.wiki.socket;

import com.kfm.wiki.entity.Doc;
import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
public class WsService {

    @Autowired
    private WebSocketServer webSocketServer;

    @Async
    public void send(String message, String logId){
        MDC.put("LOG_ID", logId);
        webSocketServer.sendInfo(message);
    }
}
